FROM registry.gitee-ai.local/base/iluvatar-corex:3.2.0-quant-bi100

WORKDIR /app
COPY .. /app

# jupyter
RUN apt-get update && \
    apt-get install -y python3.9 \
    python3-pip \
    git \
    git-lfs \
    wget     
RUN pip3 install --default-timeout=100 --no-cache-dir JPype1 ipywidgets jupyterlab pandas jupyterlab-language-pack-zh-CN jupyter-server-proxy numpy seaborn scipy matplotlib pyNetLogo SALib  -i https://mirrors.cloud.tencent.com/pypi/simple
RUN useradd -ms /bin/bash jupyter
USER jupyter
EXPOSE 7860                                           
USER root
RUN chown -R jupyter:jupyter /app

# flask

RUN pip install --no-cache-dir -r requirements.txt
# 设置环境变量
ENV FLASK_APP=main.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV FLASK_RUN_PORT=7861

# 启动服务
RUN chmod +x /app/start.sh
ENTRYPOINT ["/app/start.sh"]